<?php
/*
 * File Factuur.php for project Rijlesplanner.nl
 * Created on Feb 3, 2008 at 9:22:49 PM by Ivar Pruijn
 */
class Factuur {
  
	// Properties:
	private $Id;
	private $FranchiserId;
	private $Cursus;
	private $Nummer;
	private $Datum;
	private $Totaal;
	private $BetaaldBedrag;
	private $Status;
	private $AanmaakDatum;
	private $SluitDatum;
	private $OrigineelEmaildatum;
	private $OrigineelPrintdatum;
	private $HerinneringEmaildatum;
	private $HerinneringPrintdatum;
	private $AanmaningEmaildatum;
	private $AanmaningPrintdatum;
	private $Regels;

	// Methods:

	/**
	 * void __construct ()
	 * This is the constructor method for the Factuur class.
	 */
	public function __construct() {
   	}
   	
   	public function Factuur(array $atts=NULL) {
		$this->ConstructFromArray($atts);
	}
	
	public function getId() {
	  return $this->Id;
	}

	public function setId($newVal) {
		$this->Id = $newVal;
	}

	public function getFranchiserId() {
	  return $this->FranchiserId;
	}

	public function setFranchiserId($newVal) {
		$this->FranchiserId = $newVal;
	}

	public function getCursus() {
	  return $this->Cursus;
	}

	public function setCursus($newVal) {
		$this->Cursus = $newVal;
	}

	public function getNummer() {
	  return $this->Nummer;
	}

	public function setNummer($newVal) {
		$this->Nummer = $newVal;
	}

	public function getDatum() {
	  return $this->Datum;
	}

	public function setDatum($newVal) {
		$this->Datum = $newVal;
	}

	public function getTotaal() {
	  return $this->Totaal;
	}

	public function setTotaal($newVal) {
		$this->Totaal = $newVal;
	}

	public function getBetaaldBedrag() {
	  return $this->BetaaldBedrag;
	}

	public function setBetaaldBedrag($newVal) {
		$this->BetaaldBedrag = $newVal;
	}

	public function getStatus() {
	  return $this->Status;
	}

	public function setStatus($newVal) {
		$this->Status = $newVal;
	}

	public function getAanmaakDatum() {
	  return $this->AanmaakDatum;
	}

	public function setAanmaakDatum($newVal) {
		$this->AanmaakDatum = $newVal;
	}

	public function getSluitDatum() {
	  return $this->SluitDatum;
	}

	public function setSluitDatum($newVal) {
		$this->SluitDatum = $newVal;
	}

	public function getOrigineelEmaildatum() {
	  return $this->OrigineelEmaildatum;
	}

	public function setOrigineelEmaildatum($newVal) {
		$this->OrigineelEmaildatum = $newVal;
	}

	public function getHerinneringEmaildatum() {
	  return $this->HerinneringEmaildatum;
	}

	public function setHerinneringEmaildatum($newVal) {
		$this->HerinneringEmaildatum = $newVal;
	}

	public function getHerinneringPrintdatum() {
	  return $this->HerinneringPrintdatum;
	}

	public function setHerinneringPrintdatum($newVal) {
		$this->HerinneringPrintdatum = $newVal;
	}

	public function getAanmaningEmaildatum() {
	  return $this->AanmaningEmaildatum;
	}

	public function setAanmaningEmaildatum($newVal) {
		$this->AanmaningEmaildatum = $newVal;
	}

	public function getAanmaningPrintdatum() {
	  return $this->AanmaningPrintdatum;
	}

	public function setAanmaningPrintdatum($newVal) {
		$this->AanmaningPrintdatum = $newVal;
	}

	public function getRegels() {
	  return $this->Regels;
	}

	public function setRegels($newVal) {
		$this->Regels = $newVal;
	}

	/**
	 * void ConstructFromArray ([array attributes])
	 * This method, if an array is given as the argument, will
	 * create properties in the current object named after the
	 * keys of the array, and set the properties to the corresponding
	 * values from the array.
	 */
	private function ConstructFromArray (array $atts=NULL) {
		if (is_array($atts)) {
			while (list($key, $value) = each($atts)) {
				$this->$key = $value;
			}
		}
	}

	public function __destruct() {
//		global $logger;
//    	$logger->log("Destroying factuur " . $this->__toString() . "!\n",PEAR_LOG_INFO);
   	}
   	
   	public function __toString() {
        return $this->Nummer." (".$this->Totaal." EUR)";
    }
}
?>
